home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1999 March
/
EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso
/
www
/
amitrix
/
xv.lha
/
x-viewer.awebrx
< prev
Wrap
Text File
|
1998-04-20
|
1KB
|
54 lines
/*
$VER: x-viewer 1.03
20 Apr 1998
Display images using AWebs external viewer setting.
By William H. M. Parker <bill@amitrix.com>
FreeWare, change the file/utility name if you edit the script.
Put x-viewer.awebrx in AWEB3:plugins . In settings/gui/popup/image
Title X-Viewer
Commmand run AWeb3:plugins/x-viewer.awebrx %u
Select 'in mem' and 'not in mem'
setup menu-setting/program/programs/external viewer as well.
*/
chars = '`"=#?/:;\*%'||"'<>"
options results
if ~show('L','rexxsupport.library') then
if ~addlib('rexxsupport.library',0,-30,0) then
exit(20)
parse arg addr
file=Translate(addr,,chars)
file=Word(file, Words(file))
file=right(file,length(file)-lastpos('.',file))
if length(file)>30 then file =right(file,30)
fname='t:'time(s)'.'file
'GetCFG imageviewer var' xv
if xv="" then do
call reqch('"AWebs External viewer is not configured !" "_oops"')
end
xv=translate(xv,' ','; ')
parse upper var xv x '%F' v
xv=x||fname||v
if index(xv,'%N') > 0 then do
parse upper var xv x '%N' v
xv=x'AWeb'v
end
'LOAD' addr 'SAVEAS' fname
'wait' addr
cnt=0
do while ~exists(fname) & cnt <1000
cnt=cnt+1
end
address command xv
call delete(fname)
reqch:
parse arg reqchd
Request '"X-Viewer 1.02 WHMP"' reqchd
if rc=5 then return(0)
reqchd=result
return(reqchd)